<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>hello div</div>
    <p>hello p</p>
    <script>
      console.log(document.body.childNodes); //
      console.log(document.body.childNodes[1]); // <div>
      console.log(document.body.childNodes[3]); // <p>
      console.log(document.body.firstChild); // text
      console.log(document.body.lastChild); // script
    </script>
  </body>
</html>
